package start.demo01.inherit;

import com.alibaba.fastjson.JSON;
import lombok.Data;

//@Data
public class Son extends Sup {
    private static int count = 0;
    private String ss = "测试";

    public Son() {

//        super("你好");
    }

//    public void getS() {
//        System.out.println(this.ss);
//    }

    @Override
    public void add() {//编译器就不准和父类返回类型不同
        count++;
        //return count;
    }

    @Override
    public int getCount() {
        return count;
    }

    public static void show() {
        System.out.println("son静态重写");
    }


    public static void main(String[] args){
        Son son=new Son();
        System.out.println(son.ss);
    }
}
